<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
      .box{
          position: absolute;
          left: 0;
          top: 0;
          width: 200px;
          height: 200px;
      }
      .damao{
          background-color: pink;
          
      }
      .ermao{
          background-color: skyblue;
          /* z-index 控制叠放顺序 */
          z-index: 1;
          left: 50px;
          top: 50px;
      }
      .sanmao{
          background-color: green;
          left: 100px;
          top: 100px;
      }
      /* 盒子居中 */
      .ctr{
          position: absolute;
          left: 50%;
          margin-left: -100px;
          top: 50%;
          margin-top: -50px;
          width: 200px;
          height: 200px;
          background-color: #ff6700;
      }
    </style>
</head>
<body>
    <div class="box damao">熊大</div>
    <div class="box ermao">熊二</div>
    <div class="box sanmao">光头强</div>
    <div class="ctr">盒子居中</div>
</body>
</html>